<!DOCTYPE html>
<html lang="zh">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title><?=empty($page_title) ? SITE_NAME : "{$page_title} - " . SITE_NAME?> - 专业、严肃的非正常人类研究院</title>
	<?=$meta_content?>
	<link rel="shortcut icon" href="<?=base_url('assets/img/favicon.ico')?>" type="image/x-icon" />
	<link href="<?=base_url('assets/bootstrap/css/bootstrap.min.css')?>" rel="stylesheet" media="screen">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link href="<?=base_url('assets/bootstrap/css/bootstrap-responsive.min.css')?>" rel="stylesheet">
	<link href="<?=base_url('assets/css/style.css')?>" rel="stylesheet">
	<script type="text/javascript" src="<?=base_url('assets/js/jquery-1.10.2.min.js')?>"></script>
	<script type="text/javascript" src="<?=base_url('assets/bootstrap/js/bootstrap.min.js')?>"></script>
	<script type="text/javascript">
	var page = page || {};
	page.consts = {
		status_ok: <?=STATUS_SUCCESS?>,
		status_error: <?=STATUS_ERROR?>
	};
	page.urls = {
		vote_choice: '<?=site_url('post/vote')?>',
		vote_up_comment: '<?=site_url('post/vote_up_comment')?>',
		del_comment: '<?=site_url('post/delete_comment')?>',
		show_vote_result: '<?=site_url('post/show_vote_result')?>'
	}
	page.page_info = {
		cur_nav_index: <?=isset($nav_index) ? (int) $nav_index : 0?>,
		cur_menu_index: <?=isset($menu_index) ? (int) $menu_index : 0?>
	};
	</script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container">
		<a class="brand" href="<?=site_url()?>"><?=SITE_NAME?></a>
		<ul class="nav">
			<li id="navbar-nav-1"><a href="<?=site_url()?>"><i class="icon-home icon-white"></i> 首页</a></li>
			<?php if ($login_user_id > 0): ?>
			<li id="navbar-nav-2"><a href="<?=site_url('post/submit.html')?>"><i class="icon-pencil icon-white"></i> 发布</a></li>
			<li id="navbar-nav-3"><a href="<?=site_url('signout')?>"><i class="icon-off icon-white"></i> 退出</a></li>
			<?php else: ?>
			<li id="navbar-nav-4"><a href="<?=site_url('signup.html')?>"><i class="icon-user icon-white"></i> 注册</a></li>
			<li id="navbar-nav-5"><a href="<?=site_url('signin.html')?>"><i class="icon-hand-right icon-white"></i> 登录</a></li>
			<?php endif; ?>
			<li id="navbar-nav-6"><a href="<?=site_url('abnormal.html')?>"><i class="icon-flag icon-white"></i> 非正常研究所</a></li>
			<li id="navbar-nav-7"><a href="<?=site_url('contact.html')?>"><i class="icon-envelope icon-white"></i> 联系我们</a></li>
		</ul>
		<form class="navbar-search pull-right" method="get" action="<?=site_url('post/search')?>"><input type="text" class="search-query" placeholder="搜索" name="q"></form>
		</div>
	</div>
</div>
<div class="container">
	<?php if (!empty($bread_crumb)): ?>
	<div class="row">
		<div class="span12">
			<ul class="breadcrumb">
				<?php foreach ($bread_crumb as $item): ?>
					<?php if (isset($item['href'])): ?>
					<li><a href="<?=$item['href']?>"><?=$item['label']?></a> <span class="divider">/</span></li>
					<?php else: ?>
					<li class="active"><?=$item['label']?></li>
					<?php endif; ?>
				<?php endforeach; ?>
			</ul>
		</div>
	</div>
	<?php endif; ?>
	<div class="row">
		<div class="span9"><?=$main_content?></div>
		<div class="span3">
			<div class="row">
				<div class="span3">
				<h3>按分类查看</h3>
				<?php foreach ($category_list as $category): ?>
				<a href="<?=site_url("category/{$category['id']}_1.html")?>"><span class="label label-info"><?=$category['name']?></span></a>
				<?php endforeach; ?>
				</div>
			</div>
		</div>
	</div>
</div>
<footer class="footer">
	<div class="container">
		<div class="pull-left">&copy;2013&nbsp;&nbsp;&nbsp;&nbsp;Powered&nbsp;by&nbsp;<a href="<?=site_url()?>"><?=SITE_NAME?></a></div>
		<div class="pull-right"><a href="<?=site_url('contact.html')?>">联系我们</a></div>
	</div>
</footer>
<a id="back-to-top" href="javascript:void(0)"><i class="icon-chevron-up"></i></a>
<script type="text/javascript" src="<?=base_url('assets/js/base.js')?>"></script>
</body>
</html>